package com.joysuch.wwyt.bp.bean.inspect;

import cn.zlg.common.springmvc.validate.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.Valid;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author ZhangDong
 * @Date 2020/2/25 12:07
 */
@Data
public class BpInspectRecordBean implements Serializable {

    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty("检查计划ID")
    @NotNull(message = "请选择检查路线")
    private Long inspectPlanId;

    @ApiModelProperty("检查计划名称(检查路线)")
    private String inspectPlanName;

    @ApiModelProperty(value = "检查开始时间", example = "2020-02-27 09:38:01")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //@NotNull(message = "检查开始时间不能为空")
    //@Past(message = "请正确填写检查开始时间")
    private LocalDateTime inspectStartTime;

    @ApiModelProperty(value = "检查完成时间", example = "2020-02-27 09:38:01")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    //@NotNull(message = "检查完成时间不能为空")
    private LocalDateTime inspectFinishTime;

    @ApiModelProperty("检查人员ID")
    @NotNull(message = "请选择检查人员")
    private Long inspectUserId;

    @ApiModelProperty("检查人员姓名")
    private String inspectUserName;

    @ApiModelProperty("填报人员ID")
    @NotNull(message = "请选择填报人员")
    private Long fillFormUserId;

    @ApiModelProperty("填报人员姓名")
    private String fillFormUserName;

    @ApiModelProperty("填报时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "请选择填报时间")
    private LocalDateTime fillFormTime;

    @ApiModelProperty("检查计划任务表id-APP端才用得到")
    private Long appPlanTaskId;

    @ApiModelProperty("检查记录detail")
    @Valid
    private List<BpInspectRecordDetailBean> recordDetails;

    @ApiModelProperty("app 未检的任务标记: 未检 1; 默认 0")
    private Integer uncheckFlag = 0;

}
